/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

/**
 * 
 * @author Yang Wang <yang@digitalmenubox.com>
 */
public enum ContentType {

	IMAGE, TEXT, VIDEO, HTML, TABLE, MIXED, GIF;

	public static ContentType getContentType(String content) {
		if (content.equalsIgnoreCase(ContentType.IMAGE.toString())) {
			return ContentType.IMAGE;
		}
		if (content.equalsIgnoreCase(ContentType.TEXT.toString())) {
			return ContentType.TEXT;
		}
		if (content.equalsIgnoreCase(ContentType.VIDEO.toString())) {
			return ContentType.VIDEO;
		}
		if (content.equalsIgnoreCase(ContentType.HTML.toString())) {
			return ContentType.HTML;
		}
		if (content.equalsIgnoreCase(ContentType.TEXT.toString())) {
			return ContentType.TEXT;
		}
		if (content.equalsIgnoreCase(ContentType.TABLE.toString())) {
			return ContentType.TABLE;
		}
		if (content.equalsIgnoreCase(ContentType.GIF.toString())) {
			return ContentType.GIF;
		}
		return null;
	}
};
